package com.tzxx.spider.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * @author Created by tzxx
 * @since : 2019/5/16.
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table
public class Article implements Serializable {
    private static final long serialVersionUID = 2253481204902707607L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(value = "id",type = IdType.AUTO)//指定自增策略
    private long id;
    @Column
    private String title;
    @Column(columnDefinition = "text")
    private String content;
    @Column
    private String author;
    @Column
    private String link;
    @Column
    private String tag;
    @Column
    @Builder.Default
    private Date createTime = new Date();
    @Column
    @Builder.Default
    private Date updateTime = new Date();
}
